package com.tao.drop.controller;

import com.tao.drop.dao.impl.DropMapperImp;
import com.tao.drop.domain.People;
import com.tao.drop.service.DropService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * Created by tao on 2017/8/22.
 */
@Api(value = "打招呼接口")
@RestController
@RequestMapping("/people")
public class SayHiController {

    @RequestMapping(value = "/person",method = RequestMethod.GET)
    @ResponseBody

    @ApiOperation(notes="打招呼",value="人员列表",httpMethod = "GET")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "name", value = "人名，英文，如'mike'", paramType="query", required = false, dataType = "string"),
            @ApiImplicitParam(name = "age", value = "年龄，数字，如'10'", paramType="query", required = false, dataType = "int"),
            @ApiImplicitParam(name = "sex", value = "性别，英文，如'male'", paramType="query", required = false, dataType = "string")
    })



    public String  SayHi (@RequestParam("age") int age) {



        DropService dropService = new DropService();
        String greet = dropService.sayHiToSomeOne(age);

        return greet;
    }
    public String  SayHi2 (@RequestParam("age") int age) {



        DropService dropService = new DropService();
        String greet = dropService.sayHiToSomeOne(age);

        return greet;
    }


}
